package com.foreknow.elmboot.controller;

import com.foreknow.elmboot.po.Orders;
import com.foreknow.elmboot.service.OrderListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/OrderListController")
public class OrderListController {

    @Autowired
    private OrderListService orderListService;

    @RequestMapping("/selectOrders")
    public List<Orders> selectOrders(Integer userId){
        return orderListService.selectOrders(userId);
    }


}
